package com.grass.p019lv.adapter;

import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.androidsa.bttsddka.R;
import com.androidx.p013lv.base.Constance;
import com.androidx.p013lv.base.bean.InventionThreeBean;
import com.androidx.p013lv.base.glide.GlideUtils;
import com.androidx.p013lv.base.interfaces.Key;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

/* renamed from: com.grass.lv.adapter.AllActressAdapter */
public class AllActressAdapter extends BaseQuickAdapter<InventionThreeBean, BaseViewHolder> {
    private boolean clickLimit = true;
    private long lastClickTime;
    String mDomain;

    public void setDomain(String str) {
        this.mDomain = str;
    }

    public AllActressAdapter() {
        super(R.layout.item_more_actress_layout, null);
    }

    /* access modifiers changed from: protected */
    public void convert(BaseViewHolder baseViewHolder, final InventionThreeBean inventionThreeBean) {
        LinearLayout linearLayout = (LinearLayout) baseViewHolder.getView(R.id.ll_root);
        if (!inventionThreeBean.isEmpty()) {
            linearLayout.setVisibility(0);
            ImageView imageView = (ImageView) baseViewHolder.getView(R.id.iv_head);
            ImageView imageView2 = (ImageView) baseViewHolder.getView(R.id.iv_tag_hotOrNew);
            TextView textView = (TextView) baseViewHolder.getView(R.id.tv_nick_name);
            int mark = inventionThreeBean.getMark();
            if (mark == 1) {
                imageView2.setVisibility(0);
                imageView2.setImageResource(R.drawable.base_ic_hots);
            } else if (mark != 2) {
                imageView2.setVisibility(8);
            } else {
                imageView2.setVisibility(0);
                imageView2.setImageResource(R.drawable.base_ic_news);
            }
            if (TextUtils.isEmpty(inventionThreeBean.getHeadImg())) {
                GlideUtils.loadResId(R.drawable.ic_logo, imageView);
            } else {
                GlideUtils.loadPicHeadWh(this.mDomain + inventionThreeBean.getHeadImg(), imageView, 600);
            }
            textView.setText(inventionThreeBean.getContentName());
            linearLayout.setOnClickListener(new View.OnClickListener() {
                /* class com.grass.p019lv.adapter.AllActressAdapter.View$OnClickListenerC29651 */

                public void onClick(View view) {
                    if (!AllActressAdapter.this.isOnClick()) {
                        ARouter.getInstance().build(Constance.STAR_INFO_ACTIVITY).withInt("type", inventionThreeBean.getContentId()).withString(Key.TXT, "返回").navigation();
                    }
                }
            });
            return;
        }
        linearLayout.setVisibility(8);
    }

    public boolean isOnClick() {
        long currentTimeMillis = System.currentTimeMillis();
        long j = currentTimeMillis - this.lastClickTime;
        if (j > 1000) {
            this.lastClickTime = currentTimeMillis;
        }
        return !this.clickLimit ? j < 0 : j <= 1000;
    }
}
